using System;
using Portal.Data.Entity;
using Portal.Data.Webparts;
using Portal.Data.Config;

public partial class Webparts_Banner_BannerSelectEditor : EditorPart
{
    public override void InitEditor(WebpartConfig config)
    {
//        base.InitEditor(config);
//        rptList.DataSource = Banner.ListAll();
//        rptList.DataBind();
    }

    public override void ApplyChange(WebpartConfig config)
    {
        int id = Convert.ToInt32(Request.Form["selectedIndex"]);
        if (id != 0)
        {
            ((BannerConfig) config).Banner = id;
        }
        base.ApplyChange(config);
    }
}